# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sshtrix
pkgver=0.0.3
pkgrel=1
groups=('blackarch' 'blackarch-cracker')
pkgdesc='A very fast multithreaded SSH login cracker.'
url='http://nullsecurity.net/tools/cracker.html'
arch=('x86_64' 'aarch64')
license=('custom')
depends=('libssh')
source=("https://github.com/nullsecuritynet/tools/raw/main/cracker/$pkgname/release/$pkgname-$pkgver.tar.gz")
sha512sums=('63f88db862a077354bb11f7f443629e7054c3e2f5047054737303338fb6e288217b4a49a6d3b6aa5d0ae79bcee50d313acbbbe294994861d86fa48a3fe945e33')

prepare() {
  cd "$pkgname-$pkgver"

  sed -i "s/CFLAGS = /&$CFLAGS /" Makefile
}

build() {
  cd "$pkgname-$pkgver"

  make sshtrix
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"

  make DISTDIR="$pkgdir/usr" install
}

